home *** CD-ROM | disk | FTP | other *** search
- Path: galaxy.ucr.edu!not-for-mail
- From: thp@cs.ucr.edu (Tom Payne)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Undefined behavior? on type conversion, was: Re: Hungarian notation
- Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Date: 1 Feb 1996 19:03:52 GMT
- Organization: University of California, Riverside Department of Computer Science
- Message-ID: <4er2qo$h2s@galaxy.ucr.edu>
- References: <30C40F77.53B5@swsbbs.com> <4d2ok0$69s@beach.and.nl>
- NNTP-Posting-Host: corvette.ucr.edu
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- James Kanze US/ESC 60/3/141 #40763 (kanze@lts.sel.alcatel.de) wrote:
- : miker3@ix.netcom.com (Mike Rubenstein) writes:
- : [...]
- : |> Is it really necessary to post this kind of nonsense. No, the
- : |> documentation may not say the result is to delete your system disk.
- : |> Repeating the quote from ISO 6.2.1.2
- :
- : |> When a value with integral type is demoted to a signed integer
- : |> with smaller size or an unsigned integer is converted to its
- : |> corresponding signed integer, if the value cannot be
- : |> represented the result is implementation defined.
- :
- : |> This requires an implementation to convert the integral type. It does
- : |> not give it license to take actions not specified by the standard.
- :
- : Does it? I believe that it was the intent of the authors that the
- : `result' of the conversion could be a signal (for example) or a core
- : dump. (This is, of course, the only reasonable thing for an
- : implementation to do.)
-
- In 6.2.1.2, quoted above, it is not clear whether "result" refers to
- the "resulting value" or to the "resulting behavior". IMHO, it should
- unambiguously refer to the former --- I see no need to open the door
- to the various shenanigans that standard euphemistically calls,
- "undefined behavior."
-
- Tom Payne (thp@cs.ucr.edu)
-